<template>
  <div>
      <el-table :data="students" style="width: 100%">
        <el-table-column prop="name" label="姓名"/>
        <el-table-column prop="age" label="年龄"  />
        <el-table-column prop="gender" label="性别" />
    </el-table>
     <el-pagination
      :page-sizes="[5,10,15,20]"
      :small="small"
      :background="background"
      layout="total, sizes, prev, pager, next, jumper"
      :total="pagination.total"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script langh="ts" setup>
const props = defineProps(["students","pagination"]);
const emits = defineEmits(["show"]);
const handleSizeChange = (pageSize) => {
  emits("show",{current:props.pagination.current,pageSize});
}
const handleCurrentChange = (current) => {
  emits("show",{current,pageSize:props.pagination.pageSize});
}
</script>

<style>

</style>